package com.ccys.cms.service.userManagement.impl;


import com.ccys.cms.service.userManagement.TblMemberAiaCorporateWebService;
import com.ccys.common.vo.ResponseResult;
import com.ccys.db.dto.userManagement.TblMemberAiaCorporateDTO;
import com.ccys.db.mapper.TblPlanBenefitMemberMapper;
import com.ccys.db.page.PageUtils;
import com.ccys.db.vo.userManagement.TblMemberAiaCorporateWebVO;

import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;


/**
 * 病人的aia记录，todo如何使用管理
 */
@Service
@Slf4j
public class TblMemberAiaCorporateWebServiceImpl implements TblMemberAiaCorporateWebService {

    @Resource
    private TblPlanBenefitMemberMapper benefitMemberMapper;

    @Override
    public ResponseResult listObjectsCms(HttpServletRequest request, HttpServletResponse response, TblMemberAiaCorporateDTO dto) {
        PageUtils.startPage(request);
        List<TblMemberAiaCorporateWebVO> list = this.benefitMemberMapper.listObjectsCmsAia(dto);
        PageInfo pageInfo = new PageInfo<>(list);
        return ResponseResult.success(pageInfo);
    }
/*


    @Override
    public ResponseResult change(TblMemberAiaCorporate entity) {
        if (StringUtils.isBlank(entity.getId())) {
            // 新增
            this.saveEntity(entity);
        } else {
            // 编辑
            this.updateEntityById(entity);
        }
        return ResponseResult.success();
    }

    @Override
    public ResponseResult delete(TblMemberAiaCorporate dto) {
        TblMemberAiaCorporate entity = new TblMemberAiaCorporate();
        entity.setId(dto.getId());
        entity.setDelFlag(1);
        this.updateEntityById(entity);
        return ResponseResult.success();
    }

*/

}